import java.util.Scanner;
class Main{
	public static void main(String arg[]){
		//Khoi tao cac con vat
		System.out.println("1. Tao cac con vat");
		Bird x=new Bird();
		x.scaninfo();
		Fish y=new Fish();
		y.scaninfo();
		Tiger z=new Tiger();
		z.scaninfo();
		
		//Trinh dien kha nang cua moi con vat
		System.out.println("2. Trinh dien kha nang cua moi con vat");
		x.fly();
		y.swim();
		y.dive();
		z.run();
		Scanner scan=new Scanner(System.in);
		
		//Khoi tao luong thuc an cho cac con vat
		System.out.println("3. Cho cac con vat an \n \t Khoi tao luong thuc an cho moi con vat ");
		//cho ho an
		System.out.print("\t Chim an sau, so con sau lam thuc an cho chim la:");
		Food worm=new Food();		
		int totalworm=scan.nextInt();
		worm.setMass(totalworm);
		System.out.print("\t Moi lan con chim an so con sau la:");
		int each;
		int m=totalworm;
		each=scan.nextInt();
		int count=0;
		while((m-each)>=0){			
			x.eat(worm,each);
			m=m-each;
			count++;
		}
		if(m<=0)	System.out.println("\t Con " + x.name +" an " + count +" lan het " + totalworm + " con sau");
		else System.out.println("\t Con" + x.name +" an " + count + " lan het " + totalworm +" con sau va con du " + m + " con");
		//cho ca an
		//...
		//cho chim an
		
		//Cho cac con vat sinh san
		//Cho chim sinh san
		System.out.println("4. Cho cac con vat sinh san");
		System.out.print("\t Cho con chim "+x.getName()+" sinh san, ten con cua no la:");
		String kidBirdName="";
		scan.nextLine();
		kidBirdName=scan.nextLine();
		Bird kidBird; 
		kidBird=x.havaBaby(kidBirdName);		
		System.out.println("\t Chim "+x.getName()+" la chim bo me cua "+kidBird.getName());
		System.out.print("\t Kha nang cua chim con "+kidBird.getName()+ " la: ");
		kidBird.fly();
		//...	
			
	}
}